<template>
  <vxe-layout-container vertical>
    <vxe-layout-header class="layout-header">
      <Query :queryConfig="QueryConfig" @QueryEvent="handleQuery"></Query>
    </vxe-layout-header>
    <vxe-layout-body class="layout-body">
      <vxe-grid ref="maingrid" v-bind="GridOptions">
        <template #operation="{ row }">
          <vxe-button :size="componentSize" mode="text" status="primary" content="跟进" @click="handleFollowUp(row)"
            v-if="btnPromission.followup.buttonCaption" />
        </template>
      </vxe-grid>
    </vxe-layout-body>
    <vxe-layout-footer class="layout-footer">
      <vxe-pager :align="PagerConfig.align" :size="componentSize" :current-page.sync="PagerConfig.currentPage"
        :page-size.sync="PagerConfig.pageSize" :total="PagerConfig.total" @page-change="handlePageChange"></vxe-pager>
    </vxe-layout-footer>
    <vxe-drawer v-model="editDrawer" :title="CurrCustomerName" :width="500" show-footer show-cancel-button esc-closable>
      <template #default>
        <vxe-form ref="editForm" v-bind="FormOptions" @submit="handleEditDrawerSubmit"></vxe-form>
        <vxe-card v-for="item in FollowUpList"  width="100%" shadow :border="false">
          <template #title>
            <label>跟进日期：{{ FormatDate(item.gjsj) }}</label>
          </template>
          <template #extra>
            <label>{{ item.gdr }}</label>
          </template>
          <template #default>
            <p><label>跟进体系：</label>{{ item.txmc }}</p>
            <p><label>详情：</label>{{ item.gdxq }}</p>
          </template>
          <template #footer>
            <span>下次跟进：{{ FormatDate(item.xcgjsj) }}</span>
            <vxe-button style="margin-left: 300px;" size="mini" icon="vxe-icon-delete" circle status="danger" @click="handleDelete(item)"></vxe-button>
          </template>
        </vxe-card>
      </template>
    </vxe-drawer>
  </vxe-layout-container>

</template>
<style></style>
<script>
import XEUtils from 'xe-utils';
import CustomerFollowUp from './index.js';
export default CustomerFollowUp;
</script>
